package day09;

//本类是用来测试继承变量的使用演示demo
public class Test02 {
    public static void main(String[] args) {
//        本方式叫做匿名对象的创建，可以通过 new Man（）.来获取类里的内容
        new Man().study();
        new Boy().play();
    }
}

class Person {
    int sum = 1;
    int count = 2;
}

class Man extends Person {
    int sum = 10;

    public void study() {
        System.out.println("good,good,study");
        int sum = 100;
        System.out.println(sum);
        System.out.println(this.sum);
        System.out.println(super.sum);
    }
}

class Boy extends Man {
    int age=18;
    String name ="小明";
    public void play(){
        System.out.println(sum);
        System.out.println(count);
    }

}